package com.zking;

import java.util.function.Consumer;
import java.util.function.IntPredicate;
import java.util.function.Predicate;

public class FuctionDemo {
    public static void main(String[] args) {
        //断言函数接口
        Predicate<Integer> predicate=i->i>0;
        System.out.println(predicate.test(-9));
        IntPredicate predicate1=i->i>0;
        System.out.println(predicate1.test(9));
        //消费函数接口
        Consumer<String> consumer=s->System.out.println(s);
        consumer.accept("输入内容");
    }
}
